<%--
   Copyright 2010-2013 Bornil Photography

   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
   You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   See the License for the specific language governing permissions and
   limitations under the License.
--%>
<%@ page contentType="text/html;charset=UTF-8" %>
<%@ page session="false"%>
<%@ include file="/WEB-INF/views/includes.jsp" %>
<!DOCTYPE HTML>
<html>
<head>
    <title><fmt:message key="menu.event.mgmt"/></title>
    <link rel="stylesheet" href="${pageContext.request.contextPath}/<spring:theme code="styleSheet"/>" type="text/css"/>
</head>
<body>
    <form:form modelAttribute="event" method="post" action="${pageContext.request.contextPath}/event/saveEvent">
        <table>
            <tr>
                <td><fmt:message key="lbl.event.classification" />: </td>
                <td><form:input path="evtClass" /><form:errors path="evtClass"/></td>
            </tr>
            <tr>
                <td>
			        <c:choose>
			          <c:when test="${event['new']}">
			            <p class="submit"><input type="submit" value="Add Event"/></p>
			          </c:when>
			          <c:otherwise>
			            <p class="submit"><input type="submit" value="Update Event"/></p>
			          </c:otherwise>
			        </c:choose>
                </td>
                <td></td>
            </tr>
            <form:hidden path="evtId" />
        </table>
    </form:form>
    <a href="<c:url value='/event' />"><fmt:message key="menu.event.mgmt"/></a>
</body>
</html>